{:hook('setSkin')}
<div id="tool" class="tool ">
    {:hook('tool')}
    <if condition="check_auth('Core/Admin/View')">
      <!--  <a href="javascript:;" class="admin-view"></a>-->
    </if>
    <div class="sidebar hidden-xs">
		<ul class="ul1 ">
			<if condition="is_login()">
			<li>
				<a href="{:U('Ucenter/index/index')}">
					<php>
                        $common_header_user = query_user(array('avatar32'));
                    </php>
					<img class="avatar" src="{$common_header_user.avatar32}"/>
					<h4>我的树屋</h4>
				</a>
		  	</li>
			<else/>
			<php>
                $open_quick_login=modC('OPEN_QUICK_LOGIN', 0, 'USERCONFIG');
                $register_type=modC('REGISTER_TYPE','normal','Invite');
                $register_type=explode(',',$register_type);
                $only_open_register=0;
                if(in_array('invite',$register_type)&&!in_array('normal',$register_type)){
                    $only_open_register=1;
                }
            </php>
            <script>
                var OPEN_QUICK_LOGIN = "{$open_quick_login}";
                var ONLY_OPEN_REGISTER = "{$only_open_register}";
            </script>
			<li>
				<a data-login="do_login">
					<i class="iconfont">&#xe610;</i>
					<h4>请先登陆</h4>
				</a>
		  	</li>
		  	</if>
			<li>
				<a href="{:U('Ucenter/Config/index')}">
					<i class="iconfont">&#xe627;</i>
					<h4>修改资料</h4>
				</a>
		  	</li>
		  	<li>
				<a href="{:U('Ucenter/Index/fans')}">
					<i class="iconfont">&#xe62e;</i>
					<h4>我的粉丝</h4>
				</a>
		  	</li>
			<li>
				<a href="{:U('Ucenter/Collection/index')}">
					<i class="iconfont">&#xe619;</i>
					<h4>收藏分享</h4>
				</a>
		  	</li>
		  	<li>
				<a href="{:U('Ucenter/Message/message')}">
					<i class="iconfont">&#xe633;</i>
					<h4>站内消息</h4>
					<if condition="count($unreadMessage) neq 0">
					<span class="badge badge-important" >{:count($unreadMessage)}</span>
					</if>
				</a>
		  	</li>
		  	<if condition="is_login()">
		  	<if condition="check_auth('Admin/Index/index')">
		  	<li>
				<a href="{:U('Admin/Index/index')}">
					<i class="iconfont">&#xe61e;</i>
					<h4>后台管理</h4>
				</a>
		  	</li>
		  	</if>
		  	<li>
				<a event-node="logout">
					<i class="iconfont">&#xe623;</i>
					<h4>退出</h4>
				</a>
		  	</li>
		  	</if>
		</ul>
		
		<ul class="ul2">
			<li>
				<a href="javascript:;">
					<i class="iconfont font28 qr">&#xe640;</i>
					<h4>二维码</h4>
				</a>
				<php>$qrcode = get_cover(modC('QRCODE',0,'Config'),'path');
                	$qrcode = $qrcode?$qrcode:'__THEME_PUBLIC__/images/qrcode.png';
            	</php>
				<div class="showqr">
					<img src="{$qrcode}" />
				</div>
		  	</li>
			<li>
				<a id="go-top" href="javascript:;" class="go-top">
					<i class="iconfont">&#xe63d;</i>
					<h4>返回顶部</h4>
				</a>
		  	</li>
		</ul>
	</div>
</div>
<php>
    if(is_login()&&(get_login_role_audit()==2||get_login_role_audit()==0)){
</php>
<div id="top-role-tip" class="alert alert-danger" style="margin:0;text-align: center;">
    {:L('_TIP_ROLE_NOT_AUDITED1_')} <strong>{:L('_TIP_ROLE_NOT_AUDITED2_')}</strong>{:L('_TIP_ROLE_NOT_AUDITED3_')}
    <a target="_blank" href="{:U('ucenter/config/role')}">{:L('_TIP_ROLE_NOT_AUDITED4_')}</a>
</div>

<php>
    }
</php>
{:hook('afterTop')}